package 练习;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class t5 {
    public static void main(String[] args) {
        String pre = "yinjiacyinheng";
        String re = "yin";
        Pattern p = Pattern.compile(re);
        Matcher m = p.matcher(pre);
        int index = 0;
        while (m.find()){
            System.out.println(m.group(0));
        }
    }
}
